﻿@{
    Layout = null;
}

<!DOCTYPE html>
<!-- saved from url=(0018)http://boolan.com/ -->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <meta property="qc:admins" content="24314006454166375">
    <meta name="baidu-site-verification" content="KvVr95tdga">

    <meta name="keywords" content="乐知教育,IT,在线学习,视频,教育,开发,培训,技术,讲座,访谈,活动,课程">
    <meta name="description" content="乐知教育专注做高端IT在线学习平台，提供IT领域的高逼格课程、技术讲座、大牛访谈录和线下俱乐部。课程涵盖C,C++,C#,Python,Hadoop,Linux,软件调试,微软虚拟化,设计模式,大数据,敏捷开发等多个领域">

    <link href="http://boolan.com/favicon.ico" type="image/x-icon" rel="icon">
    <link href="http://boolan.com/favicon.ico" type="image/x-icon" rel="shortcut icon">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
   
    <meta name="keywords" content="知识乐 Unity3D课程体系 Unity3D高级 Unity3D进阶 Unity3D实战" />
    <meta name="description" content="国内Unity3D职业教育平台，为Unity3D开发者提供最新、接近实战的视频学习教程，提供最全面、完整的课程体系！" />
    <meta content="dc680e148771ccdc274b2200d35337b78ef94575" name="csrf-token" />
    <meta content="1" name="is-login" />
    <meta content="0" name="is-open" />

    <link href="~/Content/css/bootstrap.css" rel="stylesheet" />
    <link href="~/Content/css/common.css" rel="stylesheet" />
    <link href="~/Content/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/Content/css/es-icon.css" rel="stylesheet" />
    <link href="~/Content/css/main.css" rel="stylesheet" />

   

    <title>乐知教育,高端IT在线学习平台</title>

    <link rel="stylesheet" href="/Content/Index/css/shared-layout-6715bec318.css">
    <style>
        * {
            -moz-box-sizing: border-box !important;
            -webkit-box-sizing: border-box !important;
            -o-box-sizing: border-box !important;
            -ms-box-sizing: border-box !important;
            box-sizing: border-box !important;
        }

        #top-hint {
            min-width: 1200px;
        }

        .navbar {
            min-width: 1200px;
        }

            .navbar:before, .navbar:after {
                content: " ";
                display: table;
            }

            .navbar:after {
                clear: both;
            }


        .footer {
            min-width: 1200px;
        }

            .footer:before, .footer:after {
                content: " ";
                display: table;
            }

            .footer:after {
                clear: both;
            }


            .footer li > a {
                line-height: normal;
            }


        .notification {
            position: absolute;
            width: 170px;
            background-color: #F3EFC4;
            color: #2c3e50;
            font-size: 12px;
            top: 75px;
            z-index: -1;
        }

        .notification-item {
            height: 30px;
            line-height: 30px;
            padding-left: 12px;
            margin-top: 0;
            margin-bottom: 0;
            display: none;
        }

            .notification-item .btn-close {
                width: 14px;
                height: 14px;
                margin: auto;
                float: none;
                display: inline-block;
                float: right;
                margin-top: 8px;
                margin-right: 4px;
            }

                .notification-item .btn-close:hover {
                    cursor: pointer;
                }

        .notification-item-checklink {
            color: #3665ad;
        }

        #top-hint {
            background: #fff29d;
        }

        .top-hint-close-button {
            display: block;
            float: right;
            margin-right: 20px;
        }

            .top-hint-close-button:hover {
                cursor: pointer;
            }

        .top-hint-mainPart {
            height: inherit;
            float: left;
            width: 1000px;
            height: 38px;
        }

            .top-hint-mainPart > p {
                margin-top: 8px;
                margin-bottom: 0;
                color: #333;
            }

            .top-hint-mainPart:hover {
                cursor: pointer;
            }
    </style>

    <link href="/Content/Index/css/home-index.css" rel="stylesheet">
    <link href="/Content/Index/css/course.css" rel="stylesheet" />
    <script src="http://hm.baidu.com/hm.js?cb581c4d338ec0f3b1ae74d12dad369a"></script>
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?cb581c4d338ec0f3b1ae74d12dad369a";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body>
    <header class="navbar">
        <div class="container">
            <h1 class="navbar-brand" style="padding-top: 0;margin-top:0">
                <a href="/Home/Index" style="vertical-align:middle;padding-top: 0;margin-top:0">
                    <img src="@Url.Content("~/Content/images/logo.png")" style="padding-top: 0;margin-top:0" />
                </a>
            </h1>
            <nav class="nav navbar-nav" style="height:60px">
                <ul>
                    <li><a href="/Home/Index" class="active">首页</a></li>
                    <li><a href="/Home/Boutique">精品课程</a></li>
                    <li><a href="/Home/GeekClass">极客班</a></li>
                    <li><a href="/Admin/Showteacher">专家名师</a></li>
                </ul>
            </nav>
            @{
                if (Session["User"] != null)
                {
                    if (Convert.ToInt32(Session["RoleId"]) == 0)
                    {
                        <figure class="avatar navbar-avatar dd-menu">
                            @{
                        var ddd = Session["User"] == null ? "" : (Session["User"] as LeEdu.MODEL.UserInfo).Avatar;
                        if (ddd == null)
                        {
                            <img class="dd-menu-trigger" src="~/Content/img/user.png" />
                        }
                        else
                        {
                            <img class="dd-menu-trigger" src="~/Img/@ddd" />
                        }

                            }

                            <ul>
                                @{var c = (Session["User"] as LeEdu.MODEL.UserInfo).UserInfoId; }
                                <li>
                                    <a href="/Home/Personage/@c">
                                        <img src="~/Content/Index/img/setting.png" /><span>个人设置</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="/my/Index">
                                        <img src="~/Content/Index/img/messages.png" /><span>我的教学</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="/Admin/Index">
                                        <img src="~/Content/Index/img/signout.png" /><span>后台管理</span>
                                    </a>
                                </li>
                                <li>
                                    <a href="/Home/Exit">
                                        <img src="~/Content/Index/img/signout.png" /><span>注销登录</span>
                                    </a>
                                </li>
                            </ul>
                            <figcaption style="height:75px;"><span>@Session["Uname"]</span></figcaption>
                        </figure>
                    }
                    else
                        if (Convert.ToInt32(Session["RoleId"]) == 1)
                        {
                            <figure class="avatar navbar-avatar dd-menu">
                                @{
                            var ddd = Session["User"] == null ? "" : (Session["User"] as LeEdu.MODEL.UserInfo).Avatar;
                            if (ddd == null)
                            {
                                <img class="dd-menu-trigger" src="~/Content/img/default-head-image.png" />
                            }
                            else
                            {
                                <img class="dd-menu-trigger" src="~/Img/@ddd" />
                            }

                                }

                                <ul>
                                    @{var c = (Session["User"] as LeEdu.MODEL.UserInfo).UserInfoId; }
                                    <li>
                                        <a href="/Home/Personage/@c">
                                            <img src="~/Content/Index/img/setting.png" /><span>个人设置</span>
                                        </a>
                                    </li>

                                    <li>
                                        <a href="/Order/MyOrder">
                                            <img src="~/Content/images/Index2.png" /><span>我的订单</span>                                          
                                        </a>
                                    </li>
                                    <li>
                                        <a href="/my/Index">
                                            <img src="~/Content/Index/img/messages.png" /><span>我的学习</span>
                                        </a>
                                    </li>

                                    <li>
                                        <a href="/Login/Index">
                                            <img src="~/Content/Index/img/signout.png" /><span>注销登录</span>
                                        </a>
                                    </li>


                                </ul>
                                <figcaption style="height:75px;"><span>@Session["Uname"]</span></figcaption>
                            </figure>
                        }
                        else
                            if (Convert.ToInt32(Session["RoleId"]) == 2)
                            {
                                <figure class="avatar navbar-avatar dd-menu">

                                    @{ var ddd = Session["User"] == null ? "" : (Session["User"] as LeEdu.MODEL.UserInfo).Avatar;
                                     if (ddd == null)
                                     {
                                        <img class="dd-menu-trigger" src="~/Content/img/default-head-image.png" />
                                     }
                                     else
                                     {
                                        <img class="dd-menu-trigger" src="~/Img/@ddd" />
                                     }
                                    }

                                    <ul>
                                        @{
                                var c = (Session["User"] as LeEdu.MODEL.UserInfo).UserInfoId; }
                                        <li>
                                            <a href="/Group/batchShow">
                                                <span class="pull-right num"></span>
                                                <i class="es-icon es-icon-notificationson"></i>站内通知
                                            </a>
                                        </li>
                                        <li>
                                            <a href="/Home/Personage/@c">
                                                <img src="~/Content/Index/img/setting.png" /><span>个人设置</span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="/my/Index">
                                                <img src="~/Content/Index/img/messages.png" /><span>我的教学</span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="/Course/index">
                                                <img src="~/Content/Index/img/messages.png" /><span>教师课程</span>
                                            </a>
                                        </li>
                                        <li>
                                            <a href="/Login/Index">
                                                <img src="~/Content/Index/img/signout.png" /><span>注销登录</span>
                                            </a>
                                        </li>
                                    </ul>
                                    <figcaption style="height:75px;"><span>@Session["Uname"]</span></figcaption>
                                </figure>
                            }
                }
                else
                {
                    <div class="navbar-button-group button-group">
                        <ul>
                            <li>

                                <a class="button" href="/Register/Index">注册</a>

                            </li>


                            <li><a class="button-blue" href="/Login/Index">登录</a></li>

                        </ul>
                    </div>}}
        </div>
    </header>

    <section class="es-poster swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide swiper-hidden" style="background: #3ec768;">
                <div class="container">
                    <a href="" target="_blank">

                        <img src="~/Content/images/banner_net.jpg" />
                    </a>
                </div>
            </div>
        </div>
        <div class="swiper-pager"></div>
    </section>

 <section class="course-list-section " id="course-list-section">
   
     
        <div class="container">
            <div class="text-line">
                <h5><span>网校课程</span></h5>
                <div class="subtitle">精选网校课程，满足你的学习兴趣。</div>
            </div>
            <div class="course-filter" id="course-filter">
               
                
                 <ul class="nav nav-pills hidden-xs" role="tablist">
                    <li role="presentation" class="active  js-course-filter" data-url="/course/search?orderBy=latest"><a onclick="Jiazai(0)" href="javascript:;">全部课程</a></li>
                    @{
                        var lables = ViewBag.lable as List<LeEdu.MODEL.Lable>;
                        if(null!=lables)
                        {
                            foreach (var item in ViewBag.lable as List<LeEdu.MODEL.Lable>)
                    {
                        <li role="presentation" class=" js-course-filter" data-url="/course/search?categoryId=1&amp;orderBy=latest"><a onclick="Jiazai(@item.LableId)" href="javascript:;">@item.LableName</a></li>
                    }
                        }
                    }
                   
               </ul>
                @* <div class="btn-group visible-xs">
                    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">全部课程 <span class="caret"></span></button>
                    <ul class="dropdown-menu" role="menu">
                        <li role="presentation" class="js-course-filter active " data-url="/course/search?orderBy=latest"><a href="javascript:;">全部课程</a></li>
                        <li role="presentation" class="js-course-filter " data-url="/course/search?categoryId=1&amp;orderBy=latest"><a href="javascript:;">.Net学院</a></li>
                        <li role="presentation" class="js-course-filter " data-url="/course/search?categoryId=4&amp;orderBy=latest"><a href="javascript:;">PHP学院</a></li>
                        <li role="presentation" class="js-course-filter " data-url="/course/search?categoryId=6&amp;orderBy=latest"><a href="javascript:;">大放送</a></li>
                    </ul>
                </div>*@              
                <div class="course-sort btn-group">
                    <a onclick="qq('最新')" href="javascript:;" class="btn btn-default  active js-course-filter" data-url="/course/search?categoryId=0&amp;orderBy=latest">
                        最新
                    </a>
                    <a onclick="qq('最热')" href="javascript:;" class="btn btn-default js-course-filter" data-url="/course/search?categoryId=0&amp;orderBy=studentNum">
                        最热
                    </a>
                    <a onclick="qq('推荐')" href="javascript:;" class="btn btn-default js-course-filter" data-url="/course/search?categoryId=0&amp;orderBy=recommendedSeq">
                        推荐
                    </a>
                </div>
            </div>


            <div class="course-list">
                <div id="kecheng" class="row">
                    @{
                        var courses = ViewBag.list1 as List<LeEdu.MODEL.Courses>;
                        if (null != courses)
                        {
                            foreach (var item in courses)
                    {                        
                        <div class="col-lg-3 col-md-4 col-sm-6">
                            <div class="course-item">
                                @*课程展示盒子*@
                                @if (item.CImage != null)
                                {
                                <div class="course-img">
                                    <a href="/Home/ClassHour/@item.CoursesId" target="_blank">
                                        <img class="pic-image" src="/Content/images/@item.CImage" />
                                    </a>
                                </div>
                                }
                                else
                                {
                                <div class="course-img">
                                    <a href="/Home/ClassHour/@item.CoursesId" target="_blank">

                                        <img src="~/Content/images/01313460687c144023.png"/>
                                    </a>
                                </div>
                                }
                                <div class="course-info">
                                    <div class="title">
                                        <a class="link-dark" href="/Home/ClassHour/@item.CoursesId" target="_blank">
                                            @item.CoursesName
                                        </a>
                                    </div>
                                    <div class="metas clearfix">
                                        <span class="num"><i class="es-icon es-icon-people"></i>3</span>@*人数*@
                                        <span class="comment"><i class="es-icon es-icon-textsms"></i>@ViewBag.count</span>@*话题数*@
                                        <span class="course-price-widget">
                                            <span class="price">
                                                <span class="text-success">@item.CPrice</span>@*价格*@
                                            </span>
                                        </span>
                                    </div>
                                </div>
                            </div>@*课程展示盒子  END*@
                        </div>
                        }
                        }
                        }
                </div>
            </div>

            <div class="text-center mvl">@*/Home/Boutique*@
                <a href="/course/Kecheng" class="btn btn-default btn-lg">
                    更多课程 <i class="mrs-o es-icon es-icon-chevronright"></i>
                </a>
            </div>
        </div>
    </section>




    <!-- 特性 -->
    @*<section class="es-poster swiper-container">*@
        <section class="introduction-section">
            <div class="container hidden-xs">
                <div class="row">
                    <div class="col-md-4 col-sm-4 col-xs-12 introduction-item">

                        <img src="~/Content/images/icon_introduction_1.png" />
                        <h4>课程体系化</h4>
                        <h5>学习循序渐进，知识深入浅出，专治各种学习编程迷茫症。</h5>
                    </div>
                    <div class="col-md-4 col-sm-4 col-xs-12 introduction-item">

                        <img src="~/Content/images/icon_introduction_2.png" />
                        <h4>技术实战派</h4>
                        <h5>课程内容接地气，实际工作用的着。</h5>
                    </div>
                    <div class="col-md-4 col-sm-4 col-xs-12 introduction-item">

                        <img src="~/Content/images/icon_introduction_3.png" />
                        <h4>与代码为伍</h4>
                        <h5>学得怎么样？考试结果告诉你</h5>
                    </div>
                </div>
            </div>
        </section>



        <section class="course-list-section" id="course-list-section">
            <div class="container hidden-xs">
                @*<div class="constants">*@
                    <div class="text-line">
                        <h5><span>推荐教师</span><div class="line"></div></h5>
                        <div class="subtitle">名师汇集，保证教学质量与学习效果。</div>
                    </div>
                    <div class="row">

                        <div class="teacher-top">
                            @foreach (var item in ViewBag.lst3 as List<LeEdu.MODEL.UserInfo>) {
                                <div class="teacher-item">
                                    <div class="col-lg-3 col-md-4 col-sm-6">
                                        @if (item.Avatar != null) {
                                            <div class="course-img">
                                                <a href="/Home/TeacherShow/@item.UserInfoId" target="_blank">
                                                    <img class="pic-image" src="/Img/@item.Avatar" />
                                                </a>
                                            </div>
                                            }
                                        else {
                                            <div class="course-img">
                                                <a href="/Home/TeacherShow" target="_blank">
                                                    <img src="~/Content/images/01313460687c144023.png" />
                                                </a>
                                            </div>
                                            }
                                        <div class="course-info">
                                            <div class="title">
                                                <a class="link-dark" href="/Home/TeacherShow/@item.UserInfoId" target="_blank">
                                                    @item.Uname
                                                </a>
                                            </div>
                                            <div class="teacher-bottom">
                                                <div class="about">
                                                    @item.Self
                                                </div>
                                                <div class="metas">
                                                    <a class="btn btn-primary btn-sm follow-btn" href="javascript:;" data-url="/user/2/follow" style="display:none;" data-loggedin="1">关注</a>
                                                    <a class="btn btn-default btn-sm unfollow-btn" href="javascript:;" data-url="/user/2/unfollow">已关注</a>
                                                    <a class="btn btn-default btn-sm" data-toggle="modal" data-target="#modal" data-backdrop="static" data-url="/message/create/2">私信</a>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                }
                        </div>
                    </div>
                    <div class="text-center mvl">
                        <a href="/Home/TuijianTeacher" class="btn btn-default btn-lg">
                            更多教师 <i class="mrs-o es-icon es-icon-chevronright"></i>
                        </a>
                    </div>
                </div>
</section>









        <footer class="es-footer">
            <div class="footer-link">
                <div class="container">
                    <div class="row">

                        <div class="col-md-8 footer-main clearfix">
                            <div class="link-item ">
                                <h3>我是学生</h3>
                                <ul>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/347/learn#lesson/673" target="_blank">如何注册</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/347/learn#lesson/705" target="_blank">如何学习</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/347/learn#lesson/811" target="_blank">如何互动</a>
                                    </li>
                                </ul>
                            </div>

                            <div class="link-item ">
                                <h3>我是老师</h3>
                                <ul>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/22" target="_blank">发布课程</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/147" target="_blank">使用题库</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/372" target="_blank">教学资料库</a>
                                    </li>
                                </ul>
                            </div>

                            <div class="link-item ">
                                <h3>我是管理员</h3>
                                <ul>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/340" target="_blank">系统设置</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/341" target="_blank">课程设置</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/343" target="_blank">用户管理</a>
                                    </li>
                                </ul>
                            </div>

                            <div class="link-item hidden-xs">
                                <h3>商业应用</h3>
                                <ul>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/232/learn#lesson/358" target="_blank">会员专区</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/232/learn#lesson/467" target="_blank">题库增强版</a>
                                    </li>
                                    <li>
                                        <a href="http://www.qiqiuyu.com/course/380" target="_blank">用户导入导出</a>
                                    </li>
                                </ul>
                            </div>

                            <div class="link-item hidden-xs">
                                <h3>关于我们</h3>
                                <ul>
                                    <li>
                                        <a href="#" target="_blank">官网</a>
                                    </li>
                                    <li>
                                        <a href="http://weibo.com/qiqiuyu/profile?rightmod=1&amp;wvr=6&amp;mod=personinfo" target="_blank">官方微博</a>
                                    </li>
                                    <li>
                                        <a href="http://www.edusoho.com/abouts/joinus" target="_blank">加入我们</a>
                                    </li>
                                </ul>
                            </div>

                        </div>

                        <div class="col-md-4 footer-logo hidden-sm hidden-xs">
                            <a class="" href="#" target="_blank"><img src="/?6.15.1" alt="建议图片大小为233*64"></a>
                            <div class="footer-sns">
                                <a href="http://weibo.com/edusoho" target="_blank"><i class="es-icon es-icon-weibo"></i></a>
                                <a class="qrcode-popover top">
                                    <i class="es-icon es-icon-weixin"></i>
                                    <div class="qrcode-content">

                                        <img src="~/Content/images/weixinerweima.png" />
                                    </div>
                                </a>
                                <a class="qrcode-popover top">
                                    <i class="es-icon es-icon-apple"></i>
                                    <div class="qrcode-content">

                                        <img src="~/Content/images/appleerweima.png" />
                                    </div>
                                </a>
                                <a class="qrcode-popover top">
                                    <i class="es-icon es-icon-android"></i>
                                    <div class="qrcode-content">

                                        <img src="~/Content/images/androiderweima.png" />
                                    </div>
                                </a>
                            </div>
                        </div>



                    </div>
                </div>
            </div>

            <div class="copyright">
                <div class="container">
                    ﻿
                    <script src="//hm.baidu.com/hm.js?ecd38448c7571783b5c98a22e7ada795"></script>
                    <script>
                        var _hmt = _hmt || [];
                        (function () {
                            var hm = document.createElement("script");
                            hm.src = "//hm.baidu.com/hm.js?ecd38448c7571783b5c98a22e7ada795";
                            var s = document.getElementsByTagName("script")[0];
                            s.parentNode.insertBefore(hm, s);
                        })();
                    </script>
                    <a class="mlm" href="/archive/course">课程存档</a>
                    <div class="mts">
                        课程内容版权均归
                        <a href="/">
                            博览
                        </a>
                        所有
                        <a class="mlm" href="http://www.miibeian.gov.cn/" target="_blank">
                            京ICP备13017699号-2
                        </a>
                    </div>
                </div>
            </div>
        </footer>




        <div id="login-modal" class="modal" data-url="/login/ajax"></div>
        <div id="modal" class="modal"></div>



        <script src="/Content/Index/js/jquery-2.1.4.min.js"></script>
        <script src="/Content/Index/js/jquery.form.js"></script>
        <script src="/Content/Index/js/auto_textarea.js"></script>
        <script src="/Content/Index/js/popup_tip.js"></script>
        <!-- 实现导航栏的下拉菜单-->
        <script src="/Content/Index/js/dropDownMenu.js"></script>
        <!-- 实现消息操作 -->
        <script>



                                                          //课程界面类别显示
            function Jiazai(a) {
                $.ajax({
                    url: '/Home/Kecheng?id=' + a,  
                    type: 'post',    
                    success: function (data) {
                        //
                        $("#kecheng").empty();
                        for (var i = 0; i < data.length; i++) {
                            $("#kecheng").append("<div class='col-lg-3 col-md-4 col-sm-6'><div class='course-item'><div class='course-img'><img src='/Content/images/01313460687c144023.png'/></div><div class='course-info'><div class='title'>" + data[i].CoursesName + "</div></div></div></div>")  //"+a[i].CImage+"
                        }
                    }
                })
            }

            function qq(z) {

                $.ajax({
                    url: '/Home/lei?name=' + z,
                    type: 'post',
                    success: function (data) {
                        //
                        $("#kecheng").empty();
                        for (var i = 0; i < data.length; i++) {
                            $("#kecheng").append("<div class='col-lg-3 col-md-4 col-sm-6'><div class='course-item'><div class='course-img'><img src='/Content/images/01313460687c144023.png'/></div><div class='course-info'><div class='title'>" + data[i].CoursesName + "</div></div></div></div>")  //"+a[i].CImage+"
                        }
                    }
                })


                }
              
            $(function () {
                //通过轮询查看是否有新消息
                function longPolling() {
                    $.ajax({
                        url: "/MessageCenter/AnyNewMessage",
                        type: "POST",
                        dataType: "json",
                        cache: false,
                        timeout: 5000,
                        error: function (XMLHttpRequest, textStatus, errorThrown) {
                            if (textStatus == "timeout") {
                                //请求超时
                            } else {
                                //其他错误
                            }
                        },

                        success: function (data, textStatus) {
                            if (data != undefined && data.Status == "success" && data.Message == "ok") {
                                showMessage(data.Data);
                            }
                        }
                    });
                }
                setInterval(longPolling, 10000);

                //<p class="notification-item">您有3条新回复&nbsp;<a class="notification-item-checklink" href="#">查看</a><a href="#"><img class="btn-close" src="~/img/close.png" /></a></p>
                //<p class="notification-item">您有5条新系统消息&nbsp;<a class="notification-item-checklink" href="#">查看</a><a href="#"><img class="btn-close" src="~/img/close.png" /></a></p>

                //显示新消息
                function showMessage(data) {
                    if (data.NewOfficialCount > 0) {
                        $("#official-notification span").text("您有" + data.NewOfficialCount + "条新系统消息");
                        $("#official-notification .btn-close").click(clearOfficialMessage);
                        $("#official-notification").show();
                    }

                    if (data.NewReplyCount > 0) {
                        $("#reply-notification span").text("您有" + data.NewReplyCount + "条新回复");
                        $("#reply-notification .btn-close").click(clearReplyMessage);
                        $("#reply-notification").show();
                    }
                }

                //当点击查看按钮后，隐藏消息提醒，并向服务器发送请求，消除未读消息
                function clearReplyMessage() {
                    $("#reply-notification").hide();
                    $.post("/MessageCenter/ClearReply");
                }

                function clearOfficialMessage() {
                    $("#official-notification").hide();
                    $.post("/MessageCenter/ClearOfficial");
                }

            });
        </script>
        <!--实现顶部广告条-->

</body>
</html>
